
import 'package:flutter/material.dart';

class TextStatePage extends StatefulWidget{
  const TextStatePage({Key? key}) : super(key: key);

  @override
  State<StatefulWidget> createState() {
    return TextState_();
  }
}



class TextState_ extends State<TextStatePage>{
  int clickNum = 0;

  _changeTextShow(){
    setState(() {
      clickNum++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        Text("change:$clickNum"),
        RaisedButton(onPressed:(){
          _changeTextShow();
        },child: const Text("点击"),
        )
      ],
    );
  }

}